package com.github.chain.admin.common.request;

import com.github.chain.admin.common.group.InserterGroup;
import com.github.chain.admin.common.group.UpdateGroup;
import com.github.chain.admin.common.group.UserPasswordGroup;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @author AIQ
 * @date 2023/5/12
 * @project er-trader
 */
@Data
public class UserRequest extends BaseRequest {

    @NotNull(message = "用户id不能为空")
    private Long id;

    @NotBlank(message = "用户名不能为空", groups = {UpdateGroup.class})
    private String userName;
    @NotBlank(message = "用户昵称不能为空", groups = {UpdateGroup.class})
    private String nickName;
    @NotBlank(message = "密码不能为空", groups = {InserterGroup.class, UserPasswordGroup.class})
    private String password;
    @NotBlank(message = "确认密码不能为空", groups = {InserterGroup.class, UserPasswordGroup.class})
    private String confirm;
    private String phone;
    private String email;
    private Integer status;
    private Integer sex;
    private String remark;
    private List<Long> roleIds;

}
